fix(opencode): ensure help output ends with newline#28643
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs FoundI found two related PRs that appear to be addressing the same issue:
Why they're related: All three PRs (including the current PR #28643) are specifically addressing the issue of ensuring help output ends with a newline character. PR #28622 appears to be the most recent similar attempt with nearly identical scope to the current PR. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #28606
Closes #26114
Closes #27485
Type of change
What does this PR do?
opencode --helpcan print yargs help text without a trailing newline, which leaves the next shell prompt on the same line as the final help option. This updates the sharedshow()helper to append one platform newline only when the generated help text does not already end with\n.The PR also adds regression coverage for top-level help and documented command help output so future CLI help paths keep the trailing newline while preserving the existing help snapshots. Separately, it fixes the
whenvertypo in the dev control-plane README.How did you verify your code works?
npx -y bun@1.3.14 test test/cli/help/help-snapshots.test.ts --timeout 180000npx -y bun@1.3.14 typecheckScreenshots / recordings
N/A - terminal output and documentation-only changes.
Checklist